Skip to content

Pascal/mar 1115 use ai agent to detect and fix broken translations tags and - #1154

Merged
Pascal-Delange merged 5 commits into
mainfrom
pascal/mar-1115-use-ai-agent-to-detect-and-fix-broken-translations-tags-and
Oct 9, 2025
Merged

Pascal/mar 1115 use ai agent to detect and fix broken translations tags and#1154
Pascal-Delange merged 5 commits into
mainfrom
pascal/mar-1115-use-ai-agent-to-detect-and-fix-broken-translations-tags-and

Conversation

@Pascal-Delange

@Pascal-Delange Pascal-Delange commented Oct 8, 2025

Copy link
Copy Markdown
Contributor

In this PR, I let Cursor run over all our translation files to improve them.

For english translations, I mostly let it fix typos, obviously bad syntax. For french and arabic, I pushed it to be more in-depth and:

  • fix any inconsistent components strings or value strings in the translation text (with english being the reference language), there were quite a few of them
  • improve language over the board - just have a look at the french ones, you'll see what I mean
  • give me some more confidence in our arabic translations, than the auto-translation with google translate we had used in the last half year
  • remove references to "sanction checks" in favor of "screening", as "sanctions" was still present in some translation keys

I used the following prompt (or variations around it for french and english):

This is the codebase for an app used for anti fraud and anti money laundering.
Its base translation is in english. We have another set of translations in arabic, found in app-builder/src/locales/ar (english translations in app-builder/src/locales/en). It has been done part manuallly by a contributor (at the beginning) and largely using automated google translate since then. We have very low confidence on the quality of those translations.
No one in the team reads arabic.

Your job is to propose an improvement on any badly worded arabic translations. Catch typos, bad syntax, badly worded sentences, and so on. If the translation key does not tell you what kind of context the translation is used in, do not try to be creative. Use common sense.

Also verify the consistency of translation keys that contain values (in brackets {{ }}) or injected components ("< ... >") to ensure they are consisdent with the equivalent key in the reference english translations.

Do NOT try to "i did the first half of the file, should I move on?" on me. Just do it file by file, entirely. Don't ask for validation as I can't read arabic - just give me a summary of what you improved at the end.

Note that some old translation keys still refer to the fact that the app was previously doing "sanction checks", which has since been changed to "screening" (of PEP, sanctions, adverse media lists). They have most likely not been changed in arabic.

Do NOT change the translation keys themselves, even if you see typos

Start with the scenarios.json file

NB: retex: it was kind of a pain to run, because those big json files pretty quickly exhaust the context window of most models. So, I essentially needed to run it file by file, with a new cursor chat window each time.


Petit florilège des traductions françaises pourries qu'on avait:

"Mauvais mot de passe."
"Télécharger un fichier" (pour uploader)
"Statut de l'examen"
"Révision IA"
"On dirait que quelque chose s'est mal passé."
"Téléverser des données"
"Entrez l'identifiant de l'investigation"
"Politicien"
"Identifiant émis par l'autorité"
"entity.property.innCode": "AUBERGE",
"entity.property.nameSuffix": "Nom de nom",
"entity.property.opencorporatesUrl": "URL des sociétés d'opén",
"match.not_reviewable": "Non révisable",
"relation.uncle.label": "Tonton",
"home.testrun": "Testrun",
"Testez et comparez une version de scénario avec une version en direct"
"l'argumentation doit être une date",

@linear

linear Bot commented Oct 8, 2025

Copy link
Copy Markdown

@Pascal-Delange
Pascal-Delange force-pushed the pascal/mar-1115-use-ai-agent-to-detect-and-fix-broken-translations-tags-and branch from a2a6c19 to ba18dfd Compare October 9, 2025 08:49
"download_template_cta": "تحميل قالب .csv",
"drop_file_cta": "أدرج ملف .csv الخاص بك هنا.",
"errors.request_timeout": "انتهت مهلة الطلب. يرجى المحاولة مرة أخرى، أو حاول تقسيم الملف إلى أجزاء أصغر.",
"download_template_cta": "تنزيل قالب .csv",

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NB: what is invisible in github (and it's a shame IMO) but visible in cursor is that it added a [U+200E] hidden char for ordering (which IIUC is equivalent to having written vsc. instead of .csv. I found that smart. On this line and a few others, for that matter

@Pascal-Delange
Pascal-Delange requested a review from a team October 9, 2025 09:15
@Pascal-Delange
Pascal-Delange marked this pull request as ready for review October 9, 2025 09:16
Comment thread packages/app-builder/src/locales/fr/decisions.json Outdated
Comment thread packages/app-builder/src/locales/fr/decisions.json Outdated
Comment thread packages/app-builder/src/locales/fr/screenings.json
Comment thread packages/app-builder/src/locales/fr/screenings.json
@Pascal-Delange
Pascal-Delange merged commit 12dc1ad into main Oct 9, 2025
5 checks passed
@Pascal-Delange
Pascal-Delange deleted the pascal/mar-1115-use-ai-agent-to-detect-and-fix-broken-translations-tags-and branch October 9, 2025 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants